import { axios } from '@/utils/request'

export const getEmployeePage = (params) => {
  return axios({
    url: 'employee',
    method: 'get',
    params
  })
}

export const getEmployeeById = (id) => {
  return axios({
    url: 'employee/' + id,
    method: 'get'
  })
}

export const saveEmployee = (data) => {
  return axios({
    url: 'employee',
    method: 'post',
    data
  })
}

export const updateEmployeeById = (id, data) => {
  return axios({
    url: 'employee/' + id,
    method: 'put',
    data
  })
}

export const removeEmployeeById = (id) => {
  return axios({
    url: 'employee/' + id,
    method: 'delete'
  })
}
